import Link from "next/link";
import LanguageSwitcher from "@/components/custom-ui/language-switcher";
import User from "@/components/custom-ui/user";
import { auth } from "@/lib/auth";

export default async function Header() {
  const session = await auth();
  const isLogin = !!session;
  return (
    <div className="h-12 w-full flex justify-between items-center px-10 shadow-sm sticky top-0 z-50 bg-background/80 backdrop-blur-md">
      <div className="w-60 h-12 bg-primary filter-[blur(120)] absolute -left-20"></div>
      <div className="text-2xl font-bold h-12 flex items-center z-10">
        <Link href="/" className="hover:text-primary hover:text-shadow-2xs">
          X Flow
        </Link>
      </div>
      <div className="flex flex-row gap-4">
        <LanguageSwitcher />
        {isLogin ? <User /> : null}
      </div>
    </div>
  );
}
